import React from 'react'
import { NavLink, withRouter } from 'react-router-dom';
import './footer.css';
const Myfooter = (props) => {
    const { pathname } = props.location;
    const arr = ['/', '/category', '/ceo', '/cart', '/me'];
    return <>{
        arr.indexOf(pathname) !== -1 ? <div className='footer'>
            <NavLink to="/" exact>
                <div className='icon home'></div>
                <div className='icon-name'>首页</div>
            </NavLink>
            <NavLink to="/category" >
                <div className='icon type'></div>
                <div className='icon-name'>分类</div>
            </NavLink>
            <NavLink to="/ceo" >
                <div className='icon ceo'></div>
                <div className='icon-name'>会员</div>
            </NavLink>
            <NavLink to="/cart" >
                <div className='icon cart'></div>
                <div className='icon-name'>购物车</div>
            </NavLink>
            <NavLink to="/me" >
                <div className='icon mine'></div>
                <div className='icon-name'>我的</div>
            </NavLink>
        </div> : ""
    }</>
}
export default withRouter(Myfooter);
